package kitchen.beans;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * MfoodMfoodTypesRelation entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "mfood_mfood_types_relation", catalog = "delicacy")
public class MfoodMfoodTypesRelation implements java.io.Serializable {

	// Fields

	private Integer id;
	private MaterialFood materialFood;
	private MaterialFoodTypes materialFoodTypes;

	// Constructors

	/** default constructor */
	public MfoodMfoodTypesRelation() {
	}

	/** full constructor */
	public MfoodMfoodTypesRelation(Integer id, MaterialFood materialFood,
			MaterialFoodTypes materialFoodTypes) {
		this.id = id;
		this.materialFood = materialFood;
		this.materialFoodTypes = materialFoodTypes;
	}

	// Property accessors
	@Id
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "mfood_id", nullable = false)
	public MaterialFood getMaterialFood() {
		return this.materialFood;
	}

	public void setMaterialFood(MaterialFood materialFood) {
		this.materialFood = materialFood;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "mfood_type_id", nullable = false)
	public MaterialFoodTypes getMaterialFoodTypes() {
		return this.materialFoodTypes;
	}

	public void setMaterialFoodTypes(MaterialFoodTypes materialFoodTypes) {
		this.materialFoodTypes = materialFoodTypes;
	}

}